import Vue from 'vue'
import Router from 'vue-router'
import main from '@/views/main'

Vue.use(Router)

export default new Router({
  routes: [
    {
      //主页
      path: '/',
      name: 'main',
      component: main,
      children: [
        {
          path: '/page1',
          name: 'page1',
          component: () => import('../views/page1')
        }, {
          path: '/page2',
          name: 'page2',
          component: () => import('../views/page2')
        }
      ]
    }
  ]
})
